home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 23 / AACD 23.iso / AACD / Programming / tek / kn / sockcommon / destroyclientsock.c < prev    next >
Encoding:
Text File  |  2001-05-12  |  464 b   |  29 lines

  1.  
  2. /*
  3. **
  4. **    kn_destroyclientsock(sock)
  5. **
  6. */
  7.  
  8. TVOID kn_destroyclientsock(TAPTR knsock)
  9. {
  10.     struct knclientsocket *s = (struct knclientsocket *) knsock;
  11.     kn_sockenv_t *sockenv = &s->sockenv;
  12.  
  13.     kn_locksock(sockenv);
  14.  
  15.     if (shutdown(s->desc, 2))
  16.     {
  17.         dbsprintf(10, "*** TEKLIB kn_destroyclientsock: shutdown()\n");
  18.     }
  19.     
  20.     if (kn_closesocket(s->desc))
  21.     {
  22.         dbsprintf(10, "*** TEKLIB kn_destroyclientsock: close()\n");
  23.     }
  24.  
  25.     kn_unlocksock(sockenv);
  26.     
  27.     TMMUFree(s->mmu, s);
  28. }
  29.